<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charsetUTF-8">
    <title>jsp demo </title>
</head>
<body>
<h1>shiro main</h1>
<a href="${pageContext.request.contextPath}/user/logout">退出系统</a>

<ul>
    <shiro:hasAnyRoles name="user,admin">
        <li><a href="">用户管理</a></li>
        <ul>
            <shiro:hasPermission name="user:add:*">
                <li>添加</li>
            </shiro:hasPermission>
            <shiro:hasPermission name="user:update:*">
                <li>修改</li>
            </shiro:hasPermission>
            <shiro:hasPermission name="user:delete:*">
                <li>删除</li>
            </shiro:hasPermission>
            <li>查询</li>
        </ul>
    </shiro:hasAnyRoles>
    <shiro:hasRole name="admin">
        <li><a href="">商品管理</a></li>
        <li><a href="">订单管理</a></li>
        <li><a href="">物流管理</a></li>
    </shiro:hasRole>
</ul>
</body>
</html>